﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TN_CMS.Domain.Entities;

namespace TN_CMS.Domain.Abstract
{
    public interface IStaticContentRepository
    {
        IQueryable<StaticContent> StaticContents { get; }

        /// <summary>
        /// Get StaticContent by page
        /// </summary>
        /// <param name="pageIndex">page index</param>
        /// <param name="pageSize">Page size</param>
        /// <param name="total">Total page</param>
        /// <param name="orderClause">Order clause</param>
        /// <param name="pageSize">Where clause</param>
        /// <returns></returns>
        List<StaticContent> GetList(int pageIndex, int pageSize, out int total, string orderClause, string whereClause);

        /// <summary>
        /// Get StaticContent by StaticContentId
        /// </summary>
        /// <param name="id">StaticContentId</param>
        /// <returns></returns>
        StaticContent GetDetail(int id, bool getInactive = true);

        /// <summary>
        /// Save StaticContent when update or create new StaticContent
        /// </summary>
        /// <param name="StaticContent">StaticContent entity</param>
        /// <param name="actorId">adminId, who save this StaticContent</param>
        /// <returns></returns>
        int Save(StaticContent staticContent, int actorId);

        /// <summary>
        /// Delete StaticContent
        /// </summary>
        /// <param name="ids">StaticContent Id(s)</param>
        /// <returns></returns>
        void Delete(int[] ids);

        /// <summary>
        /// Change StaticContent active status 
        /// </summary>
        /// <param name="id"></param>
        /// <param name="isActive">Active status</param>
        int UpdateActive(int[] ids, bool isActive);
    }
}
